import { generateRandomId } from '@/utils';
import type { BaseTableConfig } from '@/components/base-ui/base-table/type';

export const tableConfig: BaseTableConfig = {
    items: [
        {
            modelKey: 'name',
            columnProps: {
                label: '工作时段名称',
                width: 140
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'time',
            modelKey: 'start1',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择开始时间'
            },
            columnProps: {
                label: '开始时间',
                width: 140
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'time',
            modelKey: 'end1',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择结束时间'
            },
            columnProps: {
                label: '结束时间',
                width: 140
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'time',
            modelKey: 'start2',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择开始时间'
            },
            columnProps: {
                label: '开始时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'end2',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择结束时间'
            },
            columnProps: {
                label: '结束时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'start3',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择开始时间'
            },
            columnProps: {
                label: '开始时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'end3',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择结束时间'
            },
            columnProps: {
                label: '结束时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'start4',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择开始时间'
            },
            columnProps: {
                label: '开始时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        },
        {
            itemType: 'time',
            modelKey: 'end4',
            elTimePickerProps: {
                valueFormat: 'HH:mm',
                format: 'HH:mm',
                placeholder: '选择结束时间'
            },
            columnProps: {
                label: '结束时间',
                width: 140
            },
            validProps: {
                id: generateRandomId()
            }
        }
    ],
    unIndex: true
};
